/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.src.ptit.javatraining.huynh.btvn2;

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.Locale;

/**
 *
 * @author user
 */
public class Bai6 {
    public static void main(String[] args) {
        String s,s5="";
        try{
            FileReader f5 = new FileReader("Bai6.in");
            BufferedReader fin = new BufferedReader(f5);
            s = fin.readLine();
            if(s.length()<1) throw new Exception("Xau rong !");
            while(s.indexOf("  ")!=-1) s = s.replaceAll("  "," ");
            String []s2 = s.toLowerCase().split(" ");
            for(int i=0;i<s2.length;i++){
                char s3[] = s2[i].toCharArray();
                s3[0] -=32;
                String st = new String(s3);
                s5 = s5 +st +" ";
            }
            System.out.println(s5);
        } catch(Exception e){
            System.out.println("Error "+e);
        }
    }
    
}
